#ifndef CHARACTER_H
#define CHARACTER_H

#include "ICharacter.hh"
#include "Item.hh"
#include <vector>

class Character : public ICharacter {
protected:
    std::string name;
    std::string description;
    unsigned baseHealth;
    unsigned currentHealth;
    unsigned baseAttack;
    unsigned baseDefense;
    std::vector<Item*> inventory;

    static std::vector<Item*> possibleLoot;
public:
    Character(const std::string& name, const std::string& desc,
        unsigned health, unsigned attack, unsigned defense);
    virtual ~Character();

    // ICharacter
    virtual bool isAlive() const override;
    virtual bool takeDamage(unsigned damage) override;
    virtual bool attack(ICharacter& target) override;
    virtual std::string getName() const override;
    virtual std::string getDescription() const override;
    virtual unsigned getHealth() const override;
    virtual unsigned getAttack() const override;
    virtual unsigned getDefense() const override;
    virtual std::string toString() const override;
    virtual void addToInventory(Item* item) override;
    virtual void displayInventory() const override;
    virtual void display() const override;
    static Item* generateRandomItem();
    static void initializeLootTable();
};


#endif // CHARACTER_H
